package com.example.spring.pulsar.demo.config;

import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.springframework.context.annotation.Bean;


public class PulsarConfig {

    @Bean
    public PulsarClient pulsarClient(SpringBootConfigProperties springBootConfigProperties) throws PulsarClientException {
        return PulsarClient.builder().serviceUrl("pulsar://" + springBootConfigProperties.getUrl()).build();
    }
}
